#define _CRT_SUCURE_NO_WARNINGS
#include<math.h>
#include<stdio.h>

int reverse(int x) {
    int a = 0, count = x;
    int INTMax = (int)pow(2, 31)- 1;
    int INTMin = (-1) * (int)pow(2, 31);
    while (count) {
          if(a<=INTMax/10&&a>=INTMin/10)a = a * 10 + count % 10;
          else return 0;
          count /= 10;
    }
    return a;
}

int main() {
    int ret = reverse(1534236469);
    printf("%d", ret);
	return 0;
}